<template>
  <div class="swiper">
    <el-carousel trigger="click">
      <el-carousel-item v-for="(item, index) in imgList" :key="index">
        <img :src="item" alt="">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  data () {
    return {
      num: 0
    }
  },
  props: {
    imgList: Array
  },
  computed: {
    showImg () {
      if (this.imgList) {
        return this.imgList[this.num]
      } else {
        return ''
      }
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.swiper {
  width: 600px;
  height: 300px;
  margin: 0 auto;
  position: relative;
  img {
    width: 100%;
    height: 100%;
  }

}
</style>
